extends Node

class_name Board

@export var block_scene:PackedScene

# 场景树，先走到了board这个节点，这个Board场景用来
# 1. 实例化一个block场景
# 2. 然后 对这个场景进行属性赋值，比如赋值一些data
func spawn_block(type:Shared.Block,is_next_piece,spawn_position):
	var block_data = Shared.data[type]
	var block = block_scene.instantiate() as Block
	
	block.block_data = block_data
	#print(block_data)
	#print(spawn_position)
	print("spawn_block")
	block.position = spawn_position
	add_child(block)
